首页
时事
归档
壁纸
更多
留言
关于
邻里
Search
1
使用必应Bing每日图片做网站背景(自动)
2,986 阅读
2
vue的输入值校验规则整理
1,660 阅读
3
VUE `ERR_CONNECTION_TIMED_OUT`的解决办法
1,628 阅读
4
好站推荐-https://wangchujiang.com/linux-command/
1,598 阅读
5
微信支付开发前准备(小程序、公众号、App、H5)
1,581 阅读
文章
图说
代码
吐槽
登录
Search
标签搜索
Linux
laravel
windows
TYPO3
php
shell脚本
git
微信
好站
vue
第三方登录
centos
linxu
centos7
thinkPHP
微信支付
api
MySQL
桌面
必应首图
Beer
累计撰写
114
篇文章
累计收到
22
条评论
首页
栏目
文章
图说
代码
吐槽
页面
时事
归档
壁纸
留言
关于
邻里
搜索到
3
篇与
linxu
的结果
2021-01-28
CentOS7+Nginx+MariaDB+PHP7.2+composer 安装TYPO3 v9*
前言最近感觉nginx比apache好,不要问我为什么,我就是这么认为的,我也不知道为什么。。。以下所有代码均为我自己安装时的命令,按照顺序 Ctrl+c Ctrl+v 期间敲几个 yes 就完成了。注意:以下安装步骤及命令仅在全新服务器测试安装,服务器上已有数据的同僚请不要轻易试探更新系统 yum -y update安装 nginx yum install epel-release yum install nginx systemctl start nginx systemctl enable nginx安装 mariadb yum install mariadb-server mariadb systemctl start mariadb配置数据库 mysql_secure_installation systemctl enable mariadb验证数据库 mysql -uroot -p安装php yum install epel-release yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm yum install yum-utils yum-config-manager --enable remi-php72 yum install epel-release rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm yum install php72w* --skip-broken //完整安装 yum install php72-php-pecl-zip* //安装包中貌似没有包含php扩展,但是项目中必用到,建议执行安装 yum install php-pecl-zip.x86_64 //同上修改php.ini配置 sudo sed -i 's/memory_limit.*/memory_limit = 128M/g' /etc/php.ini sudo sed -i 's/upload_max_filesize.*/upload_max_filesize = 128M/g' /etc/php.ini sudo sed -i 's/post_max_size.*/post_max_size = 128M/g' /etc/php.ini sudo sed -i 's/max_execution_time.*/max_execution_time = 30000/g' /etc/php.ini sudo sed -i 's/max_input_time.*/max_input_time = 30000/g' /etc/php.ini sudo sed -i 's/;date.timezone =/date.timezone = Asia\/Shanghai/g' /etc/php.ini sudo sed -i 's/; max_input_vars.*/max_input_vars = 1500/g' /etc/php.ini systemctl start php-fpm systemctl enable php-fpm配置php vim /etc/php-fpm.d/www.conf找到以下地方进行替换 # 找到以下地方进行替换: listen.owner = nginx listen.group = nginx user = nginx group = nginx配置nginx vim /etc/nginx/nginx.conf示例: user nginx; worker_processes auto; error_log /var/log/nginx/error.log; pid /run/nginx.pid; include /usr/share/nginx/modules/*.conf; events { worker_connections 1024; } http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; include /etc/nginx/conf.d/*.conf; index index.php index.html index.htm; server { listen 80 default_server; listen [::]:80 default_server; server_name _; root /var/www/html; include /etc/nginx/default.d/*.conf; location / { } location ~ .php$ { try_files $uri =404; root /var/www/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi.conf; } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } } }配置虚拟主机 vim /etc/nginx/conf.d/typo3.whongbin.cn.conf注意:使用composer进行安装时,需要将虚拟主机web目录设置到项目目录中的public目录才可以,解压安装的可以直接配置到项目目录示例: server { listen 80; server_name typo3.whongbin.cn; root /var/www/html/typo3.whongbin.cn/public; location / { } location ~ .php$ { try_files $uri =404; root /var/www/html/typo3.whongbin.cn/public; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi.conf; } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } }重载配置 nginx -t nginx -s reload cd /var/www/html/切换用户安装 typo3 v9 useradd composer passwd composer composer config -g repo.packagist composer https://packagist.phpcomposer.com su root cd /var/www/html/my.whongbin.cn/ composer create-project typo3/cms-base-distribution typo3.whongbin.cn ^9.5 chown -R nginx:nginx /var/www/html/ chmod -R 775 /var/www/html/ cd /var/www/html/typo3.whongbin.cn/public/ & touch FIRST_INSTALL重载php服务为了保险起见,最后配置完成后把服务都重启下 service restart php-fpm nginx -s reload最后整个安装过程大概半小时左右吧,时间浪费比较多的是 安装composer 的时候,毕竟composer是国外的服务,国内安装起来毕竟隔道墙,安装完成后建议把源换成国内的,否则你可能会渐渐的对Linux失去兴趣
2021年01月28日
666 阅读
0 评论
0 点赞
2019-03-22
CentOS7 搭建服务器监控-Linux-dash
前言这是一个开源的服务器监测软件 Git地址:https://github.com/afaqurk/linux-dash.git安装环境:Apache+Centos7安装步骤安装Apacheyum install httpd httpd-toolsLoaded plugins: fastestmirror, refresh-packagekit, security安装PHPyum install php php-xml php-common php-jsonLoaded plugins: fastestmirror, refresh-packagekit, security安装gityum install gitLoaded plugins: fastestmirror, refresh-packagekit, security下载并安装linux-dash可以直接安装在 'var/www/html/'路径(项目路径)下,也可以安装好后移动到此目录git clone https://github.com/afaqurk/linux-dash.git重启Apacheservice httpd restart重启后在浏览器中输入 http://yourdomin.com 出现以下弹框即安装正确使用截图
2019年03月22日
567 阅读
0 评论
0 点赞
2019-03-12
Centos7.x编译安装Git
yum安装git用git --version命令检查是否已经安装在CentOS7.x的yum源中已经有git的版本了,可以直接使用yum源进行安装。yum -y install git但是yum源中安装的git版本是1.7.1,Github等需要的Git版本最低都不能低于1.7.2 。所以我们一般不用上面的方法,而是下载git源码编译安装。END编译安装git首先更新系统yum -y update安装依赖的包yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker下载git最新源码并解压下载源码wget https://github.com/git/git/archive/v2.21.0.zip unzip v2.21.0.zip cd git-2.21.0编译安装:将其安装在"/usr/local/git"目录下。make prefix=/usr/local/git all make prefix=/usr/local/git install异常解决异常:如果服务器时间不对编译的过程中会报错如下图,解决办法:使用ntpdate自动校正系统时间。报错“Writing perl.mak for Git make[2]: *** [perl.mak] Error 1”,请重启apache服务,service httpd restart。编译安装完成之后使用 git --version 查看git版本,看到git版本并没有变,这是因为它默认使用了 /usr/bin 下的git。你可以用下面的命令查看git所在的路径:$ whereis git我们要把编译安装的git路径放到环境变量里,让它替换 /usr/bin 下的git。为此我们可以修改 /etc/profile 文件(或者 /etc/bashrc 文件)。vim /etc/profile然后在文件的最后一行,添加下面的内容,然后保存退出。export PATH=/usr/local/git/bin:$PATH不想重启系统,使用source命令立即生效source /etc/profile然后再次使用git --version 查看git版本,发现输出是我们安装的版本,表明安装成功。
2019年03月12日
565 阅读
0 评论
0 点赞