日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

centos8安装文件服务器,centos8 服务器环境部署

發(fā)布時(shí)間:2024/7/23 编程问答 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 centos8安装文件服务器,centos8 服务器环境部署 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

1、jdk1.8 檢查 yum 中有沒有 java1.8 包

yum list java-1.8*

開始安裝

yum install java-1.8.0-openjdk* -y

yum install redis

yum install epel-release

systemctl start redis

systemctl status redis

自啟動(dòng)

systemctl enable redis

安裝數(shù)據(jù)庫

1、安裝RPM

yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

2、安裝客戶端

yum install postgresql11

3、安裝依賴包

yum install postgresql11-libs

yum install postgresql11-contrib

yum install postgresql11-devel

4、安裝服務(wù)器端

yum install postgresql11-server

5、數(shù)據(jù)初始化與啟動(dòng)

/usr/pgsql-11/bin/postgresql-11-setup initdb

systemctl enable postgresql-11

systemctl start postgresql-11

6、修改密碼

passwd postgres

上面的方法無法安裝的時(shí)候使用下面這種

sudo dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm

rpm -qi pgdg-redhat-repo

sudo dnf module disable postgresql

sudo dnf clean all

sudo dnf -y install postgresql11-server postgresql11

dnf info postgresql11-server postgresql11

修改可訪問配置

vim /var/lib/pgsql/11/data/postgresql.conf

listen_addresses = ‘*’

port = 5432

vim /var/lib/pgsql/11/data/pg_hba.conf

host all all 0.0.0.0/0 md5

systemctl restart postgresql-11

安裝nginx

sudo yum install nginx

sudo systemctl enable nginx

sudo systemctl start nginx

腳本自啟動(dòng)

方法一:

chmod +x /etc/rc.d/init.d/yourService

cd /etc/rc.d/init.d

chkconfig --add yourService.sh

chkconfig yourService.sh on

方法二:(此方法可以正常開機(jī)執(zhí)行,且不會(huì)每次登錄都執(zhí)行,推薦)

自己寫的腳本:yourService.sh

vim /etc/init.d/yourService.sh

chmod +x /etc/init.d/yourService.sh

chkconfig --add yourService.sh

chkconfig yourService.sh on

總結(jié)

以上是生活随笔為你收集整理的centos8安装文件服务器,centos8 服务器环境部署的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。