LNMP架构搭建论坛

安装 yum install -y apr autoconf automake bison bzip2 bzip2 compat cpp curl curl-devel fontconfig fontconfig-devel freetype freetype freetype-devel gcc gcc-c++ gd gettext gettext-devel glibc kernel kernel-headers keyutils keyutils-libs-devel krb5-devel libcom_err-devel libpng libpng-devel libjpeg libsepol-devel libselinux-devel libstdc++-devel libtool libgomp libxml2 libxml2-devel libXpm libtiff libtiff make mpfr ncurses ntp openssl openssl-devel patch pcre-devel perl php-common php-gd policycoreutils telnet t1lib t1lib nasm nasm* wget zlib-devel
上传文件 rz
查看文件ls
移动文件夹mv cmake-2.8.11.2.tar.gz /usr/local/src/
mv Discuz_X3.2_SC_GBK.zip /usr/local/src/
mv freetype-2.5.3.tar.gz /usr/local/src/
mv jpegsrc.v9a.tar.gz /usr/local/src/
mv libgd-2.1.0.tar.gz /usr/local/src/
mv libmcrypt-2.5.8.tar.gz /usr/local/src/
mv libpng-1.6.12.tar.gz /usr/local/src/
mv libvpx-v1.3.0.tar.bz2 /usr/local/src/
mv mysql-5.6.19.tar.gz /usr/local/src/
mv nginx-1.6.0.tar.gz /usr/local/src/
mv openssl-1.0.1h.tar.gz /usr/local/src/
mv pcre-8.35.tar.gz /usr/local/src/
mv php-5.5.14.tar.gz /usr/local/src/
mv t1lib-5.1.2.tar.gz /usr/local/src/
mv tiff-4.0.3.tar.gz /usr/local/src/
mv yasm-1.2.0.tar.gz /usr/local/src/
mv zlib-1.2.8.tar.gz /usr/local/src/
进入目录 cd /usr/local/src/
查看 ls
解压tar xzvf cmake-2.8.11.2.tar.gz
useradd mysql -s /sbin/nologin
创建文件夹mkdir -p /usr/local/mysql/var
赋予权限chown -Rf mysql:mysql /usr/local/mysql
查看权限 ll
进入目录cd /usr/local/
查看权限 ll
进入目录 cd src/
查看权限 ll
解压 tar xzvf mysql-5.6.19.tar.gz
进入目录 cd cmake-2.8.11.2/
解读 ./configure
安装 make
安装make install
返回上层目录cd ..
进入目录 cd mysql-5.6.19/
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/var -DSYSCONFDIR=/etc
安装make
安装make install
rm -rf /etc/my.cnf
进入目录cd /usr/local/mysql/
./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var
ln -s my.cnf /etc/my.cnf
拷贝cp ./support-files/mysql.server /etc/rc.d/init.d/mysqld
赋予权限chmod 755 /etc/rc.d/init.d/mysqld
进入目录cd /etc/rc.d/init.d/
编辑文件 vi /etc/rc.d/init.d/mysqld
46行 basedir=/usr/local/mysql
47行 datadir=/usr/local/mysql/var
重启service mysqld start
chkconfig mysqld on
编辑文件vi /etc/profile
74行 export PATH=$PATH:/usr/local/mysql/bin
source /etc/profile
mkdir /var/lib/mysql
ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql
ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
ln -s /usr/local/mysql/include/mysql /usr/include/mysql
mysql_secure_installation

转载于:https://blog.51cto.com/13956268/2176315

你可能感兴趣的:(LNMP架构搭建论坛)