欢迎来到天天文库
浏览记录
ID:13491500
大小:399.42 KB
页数:28页
时间:2018-07-22
《服务器安装配置说明》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、服务器安装配置说明一、Centos6.2安装安装步骤参考地址:http://www.cnblogs.com/pharen/archive/2012/02/06/2339322.html设置开机后自动启动网络:#将ONBOOT=no 改成 yes 就表示开机后默认链接ethvi /etc/sysconfig/network-scripts/ifcfg-eth0 vi /etc/sysconfig/network-scripts/ifcfg-eth1 LINUX环境安装好以后,开始配置MYSQL、APAC
2、HE、PHP、FTP等。为了统一起见,我们将软件包统一存放:1、软件源码包存放位置:/home2、源码包编译安装位置:/use/local/二、Centos6.2下编译安装MySQL-5.5.22现在的MySQL都使用Cmake进行编译安装,所以在安装MySQL之前我们首先要把Cmake装在我们的系统。我们需要的软件源码包有:cmake-2.8.7.tar.gz和mysql-5.5.22.tar.gz。1、安装Cmake#安装所需依赖关系yum-yinstallntpvim-enhancedgccgc
3、c-c++flexbisonautoconfautomakebzip2-develncurses-develzlib-devellibjpeg-devellibpng-devellibtiff-develfreetype-devellibXpm-develgettext-develpam-devellibtoollibtool-ltdlopensslopenssl-develfontconfig-devellibxml2-develcurl-devellibiculibicu-devellibmcry
4、ptlibmcrypt-devellibmhashlibmhash-devel#下载Cmake的源码包wgethttp://www.cmake.org/files/v2.8/cmake-2.8.7.tar.gz#解压Cmake包tarzxfcmake-2.8.7.tar.gzcdcmake-2.8.7#配置Cmake./configure#编译Cmakemake#安装Cmakemakeinstall2、编译安装配置MySQL#创建所需目录mkdir-pv/usr/local/mysql/data#创建
5、mysql用户和mysql组groupaddmysqluseradd-gmysql-s/usr/sbin/nologinmysql#解压mysql源码包tarzxfmysql-5.5.22.tar.gzcdmysql-5.5.22#cmake编译cmake-DCMAKE_INSTALL_PREFIX=/usr/local/mysql-DMYSQL_DATADIR=/usr/local/mysql/data-DDEFAULT_CHARSET=utf8-DDEFAULT_COLLATION=utf8_un
6、icode_ci-DWITH_READLINE=1-DWITH_SSL=system-DWITH_EMBEDDED_SERVER=1-DENABLED_LOCAL_INFILE=1-DDEFAULT_COLLATION=utf8_general_ci-DWITH_MYISAM_STORAGE_ENGINE=1-DWITH_INNOBASE_STORAGE_ENGINE=1-DWITH_DEBUG=0#安装make&&makeinstall#复制配置文件cpsupport-files/my-medium
7、.cnf/etc/my.cnf#设置权限chmod+x/usr/local/mysqlchown-Rmysql:mysql/usr/local/mysqlchown-Rmysql:mysql/usr/local/mysql/data#配置开机自动启动cpsupport-files/mysql.server/etc/init.d/mysqldchmod+x/etc/init.d/mysqldchkconfig--addmysqldchkconfigmysqldon#修改配置文件vim/etc/my.cn
8、f#在[mysqld]中添加:datadir=/usr/local/mysql/datalog-error=/usr/local/mysql/data/error.logpid-file=/usr/local/mysql/data/mysql.piduser=mysqltmpdir=/tmp#保存退出#初始化数据库/usr/local/mysql/scripts/mysql_install_db--user=mysql--basedir=/usr/loc
此文档下载收益归作者所有