码迷,mamicode.com
首页 > 其他好文 > 详细

LNMP架构搭建论坛

时间:2018-09-17 19:50:04      阅读:162      评论:0      收藏:0      [点我收藏+]

标签:gcc-c++   glib   std   soc   chmod   mod   epo   4.0   linux   

安装 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

LNMP架构搭建论坛

标签:gcc-c++   glib   std   soc   chmod   mod   epo   4.0   linux   

原文地址:http://blog.51cto.com/13956268/2176315

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!