xg10086.cn
注 册 商: 北京新网数码信息技术有限公司HTTP/1.1 200 OK 服务器:AliyunOSS 访问时间:2019年06月13日 03:27:50 类型:text/html Transfer-Encoding: chunked 连接:keep-alive 动作:Accept-Encoding x-oss-request-id: 5D0152366646AC7EE92D74F1 修改日期:2019年05月08日 15:40:18 x-oss-object-type: Normal x-oss-hash-crc64ecma: 4325331685673328998 x-oss-storage-class: Standard Content-MD5: KZYWblDn1VaVqLOohbReww== x-oss-server-time: 57 Content-Encoding: gzip 页面编码:UTF-8
重要文档!重要文档!重要文档!重要文档!你好呀,同学,欢迎加入阿里行政大家庭。我们服务阿里巴巴 6 万名员 工,为大家排忧解难,我们的口号是:有事就找行政 1818。 行政热线:1818 - 2首 页LEMP环境配置收 藏分 享编 辑LEMP环境配置1 环境1.1 ius先去安装一下这个仓库:sudo yum install https://centos7.iuscommunity.org/ius-release.rpm -yius 仓库依赖 epel-release 仓库,所以安装了 ius,也就安装了 epel-release 。ius 仓库可以用在 Redhat 或 CentOS 系统上,安装的时候也要注意适用的系统的版本。上面安装的是适合在 CentOS 7 上使用的 ius 仓库。1.2 NGINX创建仓库文件vim /etc/yum.repos.d/nginx.repo稳定版仓库[nginx]name=nginx repobaseurl=http://nginx.org/packages/centos/7/$basearch/gpgcheck=0enabled=1安装:sudo yum install nginx -y启动:sudo systemctl start nginx开机自启动:sudo systemctl enable nginx访问站点看到 NGINX 欢迎界面,证明成功。1.3 MariaDB删除原来的低版本的 MariaDB,用 yum remove 可以删除指定的软件包。执行:sudo yum remove mariadb-libs -y删除以后,执行安装新版本的 MariaDBsudo yum install mariadb101u-server -y启动:sudo systemctl start mariadb配置开机自启动:sudo systemctl enable mariadb安全配置再做点安全相关的配置,为 root 用户设置密码等等。执行:mysql_secure_installation1.4 PHPPHP 有很多扩展,根据网站的需求,安装不同的 PHP 扩展。安装:sudo yum install php72u-cli php72u-common php72u-fpm php72u-gd php72u-mbstring php72u-mysqlnd php72u-json php72u-xml php72u-pecl-memcached php72u-opcache php72u-bcmath php72u-devel -y启动:sudo systemctl start php-fpm配置开机自启动:sudo systemctl enable php-fpm2 配置2.1 配置 NGINX进入 NGINX 的配置目录:cd /etc/nginx/conf.d编辑配置文件:sudo vi default.conf配置文件里的内容是:server {listen 80;server_name demo.com;return 301 https://$server_name$request_uri;}server {listen 443;server_name demo.com; ssl on; root /mnt/web; index index.php index.html; ssl_certificate cert/demo.pem; ssl_certificate_key cert/demo.key; ssl_session_timeout 5m; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$|^/update.php { fastcgi_split_path_info ^(.+?\.php)(|/.*)$; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; fastcgi_param HTTP_PROXY ""; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param QUERY_STRING $query_string; fastcgi_intercept_errors on; } } 在网站根目录下面创建一个 php 文件: echo "<?php phpinfo(); ?>" >> /mnt/web/phpinfo.php 重载 NGINX 可以让配置生效: sudo systemctl reload nginx 2.2 配置 PHP-FPM把运行 PHP-FPM 的用户修改成 nginx vim /etc/php-fpm.d/www.conf 修改成: user = nginx group = nginx 重载 PHP-FPM 服务: sudo systemctl reload php-fpm session 目录权限 chown -R nginx:nginx /var/lib/php/fpm 3 工具3.1 unzip解压 zip 格式的压缩文件,需要用到 unzip。 sudo yum install unzip -y 3.2. Git安装Git: sudo yum install git2u -y 如果出现冲突的提示,是因为系统里已经包含了 Git,需要先删除掉系统里的 Git 才能继续安装。再做一点简单的配置,告诉 Git 我们是谁: git config --global user.name "xpress" git config --global user.email "support@xgwww.com" 3.3. ComposerComposer 是 PHP 的包管理工具。Drupal,Laravel 这类的应用都需要用到 Composer 。安装 Composer: cd ~ curl -sS https://getcomposer.org/installer | php php composer.phar sudo mv composer.phar /usr/local/bin/composer compo
© 2010 - 2020 网站综合信息查询 同IP网站查询 相关类似网站查询 网站备案查询网站地图 最新查询 最近更新 优秀网站 热门网站 全部网站 同IP查询 备案查询
2024-04-28 22:27, Process in 0.0083 second.