Kaydet (Commit) c8176b7a authored tarafından mertcelen's avatar mertcelen

Update installation guide.

üst 766646aa
# Liman Sunucu Yönetimi
### Kurulum
Kurulum Ubuntu 16.04 üzerinden anlatılmıştır.
##### Dosyaların İndirilmesi
**Yalnızca İnternet bağlantınız ssl sertifikası yüzünden indirmenize izin vermiyorsa** aşağıdaki komutu çalıştırıp devam edin.
```bash
export GIT_SSL_NO_VERIFY=1
```
Github'dan kodların alınması
```bash
sudo git clone https://github.com/mertcelen/liman.git /var/www/liman
```
##### PHP 7.2 Kurulumu
```bash
echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/ondrej.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 4F4EA0AAE5267A6C
#### Gerekli Klasorleri Olusturmak
sudo mkdir -p /liman/{server,certs,logs,webssh}
sudo mkdir -p /data/db/
#### Git Kurulumu
sudo apt install git -y
#### Dosyalari Indirmek
sudo git clone https://github.com/mertcelen/liman.git /liman/server
sudo git clone https://github.com/mertcelen/webssh.git /liman/webssh
#### Sistem Servislerinin Kopyalanmasi
sudo cp /liman/server/liman-queue.service /etc/systemd/system/liman-queue.service
sudo cp /liman/webssh/liman-webssh.service /etc/systemd/system/liman-webssh.service
sudo cp /liman/server/liman.service /etc/systemd/system/liman.service
#### Depolari Guncellemek
sudo apt update
sudo apt install php php-fpm composer php-mongodb php-ldap php-mbstring php-xml php-zip
```
##### Nginx Kurulumu
#### PHP ve diger kutuphanelerin kurulumu
sudo apt install php-fpm -y
sudo apt install php php-mongodb php-ldap php-mbstring php-xml php-zip -y
```bash
#### Ubuntu'daki olmayan guncel surumun kurulumu
wget http://ppa.launchpad.net/ondrej/php/ubuntu/pool/main/p/php-mongodb/php-mongodb_1.5.3-1+ubuntu18.04.1+deb.sury.org+10_amd64.deb
sudo dpkg -i php-mongodb_1.5.3-1+ubuntu18.04.1+deb.sury.org+10_amd64.deb
sudo rm php-mongodb_1.5.3-1+ubuntu18.04.1+deb.sury.org+10_amd64.deb
#### Nginx Kurulumu
sudo apt install nginx -y
sudo systemctl enable nginx
```
##### Self-Signed Sertifika Oluşturma
#### Self Signed Sertifika
#### sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /liman/certs/liman.key -out /liman/certs/liman.crt
sudo openssl req \
-new \
-newkey rsa:4096 \
-days 365 \
-nodes \
-x509 \
-subj "/C=TR/ST=Ankara/L=Merkez/O=deneme/CN=liman" \
-keyout /liman/certs/liman.key \
-out /liman/certs/liman.crt
#### MongoDB Kurulumu
sudo apt install mongodb -y
sudo chown `id -u` /data/db
```bash
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/nginx.key -out /etc/ssl/certs/nginx.crt
```
#### Gerekli Paketler
sudo apt install sshpass telnet nmap python3 python3-paramiko python3-tornado -y
##### MongoDB Kurulumu
#### Config Dosyasi Linkleme
sudo mv /liman/server/.env.example /liman/server/.env
sudo ln -sf /liman/server/.env /liman/liman.conf
```bash
sudo apt install mongodb
sudo mkdir -p /data/db/
sudo chown `id -u` /data/db
sudo systemctl enable mongodb
```
##### Liman Ayarları
```bash
sudo apt install sshpass -y
cd /var/www/liman
```
**Yalnızca İnternet bağlantınız ssl sertifikası yüzünden indirmenize izin vermiyorsa** aşağıdaki komutu çalıştırıp devam edin.
```bash
composer config --global disable-tls true
composer config --global secure-http false
```
Yetki Ayarları
```bash
sudo chown -R `id -u`:`id -u` ~/.composer
sudo mv .env.example .env
sudo mv nginx.conf /etc/nginx/nginx.conf
sudo composer install
sudo php artisan key:generate
#### Liman Sessionlari icin Key Olusturma
sudo php /liman/server/artisan key:generate
#### Liman Kullanicisi Olusturma
sudo useradd liman -M
sudo chmod -R o= .*
sudo chown -R liman:liman .*
sudo chmod -R o= /liman
sudo chown -R liman:liman /liman
#### Nginx Ayarlari
sudo cp /liman/server/nginx.conf /etc/nginx/sites-available/liman.conf
sudo ln -s /etc/nginx/sites-available/liman.conf /etc/nginx/sites-enabled/liman.conf
#### Servisleri Aktiflestirmek
sudo systemctl enable nginx
sudo systemctl enable mongodb
sudo systemctl enable liman
sudo systemctl enable liman-queue
sudo systemctl enable liman-webssh
#### Nginx ve PHP FPM ayarlari
sudo sed -i "s/www-data/liman/g" /etc/nginx/nginx.conf
sudo sed -i "s/www-data/liman/g" /etc/php/7.2/fpm/pool.d/www.conf
#### ** Gecici Cozum **
sudo sed -i "s/if origin is not/if False and origin is not/g" /usr/lib/python3/dist-packages/tornado/websocket.py
#### Web Sunucusunu Ayaga Kaldirmak
sudo systemctl restart php7.2-fpm
sudo systemctl restart nginx
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment