centos8安装文件服务器,centos8 服务器环境部署
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
自啟動
systemctl enable redis
安裝數據庫
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、安裝服務器端
yum install postgresql11-server
5、數據初始化與啟動
/usr/pgsql-11/bin/postgresql-11-setup initdb
systemctl enable postgresql-11
systemctl start postgresql-11
6、修改密碼
passwd postgres
上面的方法無法安裝的時候使用下面這種
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
腳本自啟動
方法一:
chmod +x /etc/rc.d/init.d/yourService
cd /etc/rc.d/init.d
chkconfig --add yourService.sh
chkconfig yourService.sh on
方法二:(此方法可以正常開機執行,且不會每次登錄都執行,推薦)
自己寫的腳本:yourService.sh
vim /etc/init.d/yourService.sh
chmod +x /etc/init.d/yourService.sh
chkconfig --add yourService.sh
chkconfig yourService.sh on
總結
以上是生活随笔為你收集整理的centos8安装文件服务器,centos8 服务器环境部署的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python实现多语言语种识别_用Pyt
- 下一篇: python 类方法 函数_Python