愉快的lnmp环境搭建
- 后续更新
- 几个笔记记录
yum remove php-mysql yum -y install cmake autoconf wget gcc-c++ gcc zlib pcre pcre-devel zip
yum -y install bison bison-devel perl vim libjpeg libjpeg-devel libpng libpng-devel
yum -y install freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel
yum -y install bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel
yum -y install openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers make gd gd2 gd-devel gd2-devel
yum -y install libaio mlocate lsof epel-release php-mcrypt libmcrypt libmcrypt-devel mhash libiconv mcrypt libzip openssl openssl-devel mysqlnd
yum -y updatewget http://nginx.org/download/nginx-1.9.9.tar.gz
./configure
--user=www
--group=www
--prefix=/workspace/app/nginx
--with-pcre
--with-http_stub_status_module
--with-http_ssl_module
--with-http_realip_module
--with-http_image_filter_modulewget -c https://downloads.mysql.com/archives/get/file/mysql-5.6.25.tar.gz
cmake
-DCMAKE_INSTALL_PREFIX=/workspace/app/mysql
-DMYSQL_DATADIR=/workspace/data/mysql/data
-DSYSCONFDIR=/etc-DMYSQL_UNIX_ADDR=/tmp/mysqld.sock
-DWITH_MYISAM_STORAGE_ENGINE=1
-DWITH_INNOBASE_STORAGE_ENGINE=1
-DMYSQL_TCP_PORT=3306
-DENABLED_LOCAL_INFILE=1
-DWITH_PARTITION_STORAGE_ENGINE=1
-DEXTRA_CHARSETS=all
-DDEFAULT_CHARSET=utf8mb4
-DDEFAULT_COLLATION=utf8mb4_unicode_ci./scripts/mysql_install_db --user=mysql --datadir=/workspace/data/mysql/data
cp support-files/my-default.cnf /etc/my.cnf
wget https://www.php.net/distributions/php-7.3.11.tar.gz
./configure
--prefix=/workspace/app/php/php73
--with-config-file-path=/workspace/data/php/php73
--with-mysqli=/workspace/app/mysql/bin/mysql_config
--with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd
--with-iconv
--with-freetype-dir
--with-jpeg-dir
--with-png-dir
--with-zlib
--with-libxml-dir
--enable-xml
--disable-rpath
--enable-bcmath
--enable-shmop
--enable-sysvsem
--enable-inline-optimization
--with-curl
--enable-mbregex
--enable-fpm
--enable-mbstring
--with-mcrypt
--with-gd
--enable-gd-native-ttf
--with-openssl
--with-mhash
--enable-pcntl
--enable-sockets
--with-xmlrpc
--enable-zip
--with-bz2
--enable-soap
--enable-opcache
--with-pdo-mysql
--enable-maintainer-zts
--enable-pcntl
--enable-shmop
--enable-sysvmsg
--enable-sysvsem
--enable-sysvshm
--without-pear
--with-gettext
--enable-fpm
--enable-opcache=no# 配置nginx支持php fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name
#设置环境变量 PATH=$PATH:$HOME/bin:/workspace/app/mysql/bin:/workspace/app/mysql/lib #制作成服务,并随系统自启动 cp support-files/mysql.server /etc/init.d/mysql #相关命令: service mysql start #停止mysql服务 service mysql stop #重启mysql服务 service mysql restart
#添加到开机启动项 chkconfig --add mysql
#下面是为了将php-fpm制成服务,并随随系统自启动。 cp ./sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm未完。。待续。。
#mysql 启动的时候指定配置文件
--defaults-file=/etc/my.cnf
# 查看mysql默认读取my.cnf的目录
mysql --help|grep 'my.cnf'
# 查看是否使用了指定目录的my.cnf
ps aux|grep mysql|grep 'my.cnf'或
ps aux|grep mysqld|grep 'my.cnf' - 参考链接
[mysql boost 安装](https://www.cnblogs.com/galengao/p/5755788.html)
[cmake 依赖安装](https://my.oschina.net/Alexmyj/blog/1541769)
[root 忘记密码](https://www.cnblogs.com/ivictor/p/9243259.html)
[mysql创建用户与授权](https://www.jianshu.com/p/d7b9c468f20d)
[启动php-fpm](https://www.jianshu.com/p/7627c794b272)
[127.0.0.1连不上mysql](https://www.cnblogs.com/whlives/p/4495106.html)
['mysql.user' doesn't exists](https://blog.csdn.net/leshami/article/details/41801395)
[Linux添加服务,让程序开机运行](http://xiaoxuenotes.com/blog/2012/09/28/linux-service.html)
[Linux下安装Nginx配置自启动](https://blog.csdn.net/fukai8350/article/details/80634566)
[gcc升级到6.3.0版本](https://blog.csdn.net/u014608280/article/details/80569328)
[添加一个不能登录的用户](https://www.runoob.com/linux/linux-comm-useradd.html)