-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripts.ssh
72 lines (63 loc) · 2.04 KB
/
scripts.ssh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
cp wp-config-sample.php wp-config.php
sed -i 's/database_name_here/PROJECT/' wp-config.php
sed -i 's/username_here/root/' wp-config.php
sed -i 's/password_here/DATABASEPASSWORD/' wp-config.php
mysql -uroot -pDATABASEPASSWORD -e "CREATE DATABASE PROJECT"
echo "define('WP_MEMORY_LIMIT', '256M');
define('WP_MAX_MEMORY_LIMIT', '512M');
define('FS_METHOD', 'direct');" >> wp-config.php
touch .htaccess
echo "<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
php_value upload_max_filesize 1000M
php_value post_max_size 2000M
php_value memory_limit 3000M
php_value max_execution_time 180
php_value max_input_time 180" >> .htaccess
sudo chown -R www-data:root /var/www/PROJECT
cd /etc/apache2/sites-enabled/
touch PROJECT.conf
echo '
<VirtualHost *:80>
ServerName 'DOMAIN'
ServerAdmin webmaster@localhost
DocumentRoot /var/www/'PROJECT'
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/'PROJECT'>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>' >PROJECT.conf
sudo service apache2 restart
cd /var/www/PROJECT/
sudo cat gitlab2.txt > .gitlab-ci.yml
git config --global user.email "[email protected]"
sudo git add .gitignore
sudo git commit -m"first commit"
sudo git add .
sudo git commit -m"push code"
sudo git push origin master
sudo rm scripts.ssh