Ubuntu Nginx最新版 にWordPressをインストール

wget https://nginx.org/keys/nginx_signing.key
sudo apt-key add nginx_signing.key
sudo vi /etc/apt/sources.list.d/nginx.list
deb [arch=amd64] http://nginx.org/packages/mainline/ubuntu/ bionic nginx
deb-src http://nginx.org/packages/mainline/ubuntu/ bionic nginx
sudo apt update -y && sudo apt upgrade -y 
sudo apt install build-essential zlib1g-dev libpcre3 libpcre3-dev libssl-dev unzip git wget libxslt-dev libgd-dev libgeoip-dev libperl-dev 
-y

必要ツールをインストール

sudo chown 1111 /usr/local/src && cd /usr/local/src
git clone --recursive https://github.com/google/ngx_brotli.git

brotliをダウンロード

git clone https://github.com/openssl/openssl.git
cd openssl && git branch -a
git checkout OpenSSL_1_1_1-stable && cd ..
./configure \
--prefix=/etc/nginx \
--sbin-path=/usr/sbin/nginx \
--modules-path=/usr/lib64/nginx/modules \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--http-client-body-temp-path=/var/lib/nginx/tmp/client_body \
--http-proxy-temp-path=/var/lib/nginx/tmp/proxy \
--http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi \
--http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi \
--http-scgi-temp-path=/var/lib/nginx/tmp/scgi \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/lock/subsys/nginx \
--user=nginx \
--group=nginx \
--with-file-aio \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_xslt_module=dynamic \
--with-http_image_filter_module=dynamic \
--with-http_geoip_module=dynamic \
--with-http_sub_module \
--with-http_dav_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_random_index_module \
--with-http_secure_link_module \
--with-http_degradation_module \
--with-http_slice_module \
--with-http_stub_status_module \
--with-http_perl_module=dynamic \
--with-mail=dynamic \
--with-mail_ssl_module \
--with-pcre \
--with-pcre-jit \
--with-stream=dynamic \
--with-stream_ssl_module \
--with-debug \
--with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' \
--with-ld-opt=' -Wl,-E' \
--with-openssl=/usr/local/src/openssl \
--add-module=/usr/local/src/ngx_brotli

make
sudo make install
sudo useradd --no-create-home nginx
sudo mkdir -p /var/lib/nginx/tmp/client_body
sudo vi /lib/systemd/system/nginx.service
[Unit]
Description=The NGINX HTTP and reverse proxy server
After=syslog.target network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
PIDFile=/run/nginx.pid
ExecStartPre=/usr/sbin/nginx -t
ExecStart=/usr/sbin/nginx
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true

[Install]
WantedBy=multi-user.target
sudo systemctl enable nginx
sudo systemctl start nginx
systemctl status nginx
sudo mkdir /var/www && cd /var/www
sudo wget https://ja.wordpress.org/latest-ja.tar.gz && sudo tar xvf latest-ja.tar.gz
sudo mv wordpress 5555.com
sudo chown -R nginx:nginx 5555.com
sudo add-apt-repository ppa:ondrej/php
sudo add-apt-repository ppa:ondrej/nginx-mainline
sudo apt install php7.3 php7.3-cli php7.3-fpm php7.3-curl php7.3-gd php7.3-json php7.3-mbstring php7.3-mysql php7.3-xml php7.3-zip -y
未分類
スポンサーリンク
仮想犬

コメント

タイトルとURLをコピーしました