Created
July 11, 2020 03:25
-
-
Save linuxbiekaisar/44975b0ef2f5bb2351a098de55f88d89 to your computer and use it in GitHub Desktop.
TreoPIM install in ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo apt update | |
##Install PHP, MySQL, Apache2 | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
sudo apt-get install mysql-server php7.2 php7.2-json php7.2-xml php7.2-imap php7.2-zip php7.2-curl php7.2-intl php7.2-mbstring php7.2-mysql php7.2-gd php7.2-mcrypt apache2 libapache2-mod-php7.2 php7.2-cli php7.2-apcu unzip git curl php7.2-ldap php-mailparse | |
sudo phpenmod imap mbstring | |
sudo service apache2 restart | |
##Settings php.ini | |
sudo nano /etc/php/7.2/apache2/php.ini | |
max_execution_time = 180 | |
max_input_time = 180 | |
memory_limit = 256M | |
post_max_size = 50M | |
upload_max_filesize = 50M | |
date.timezone = Asia/Jakarta | |
##Create New Database | |
sudo mysql -u root -p | |
CREATE DATABASE treopimdb DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; | |
GRANT ALL ON treopimdb.* TO 'treopimdb'@'localhost' IDENTIFIED BY 'aS@$%ka*&zG@#Hs001@'; | |
FLUSH PRIVILEGES; | |
EXIT | |
##Install Composer | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
php -r "if (hash_file('sha384', 'composer-setup.php') === 'e0012edf3e80b6978849f5eff0d4b4e4c79ff1609dd1e613307e16318854d24ae64f26d17af3ef0bf7cfb710ca74755a') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
php composer-setup.php | |
php -r "unlink('composer-setup.php');" | |
##Install Treopim | |
composer create-project treo/treopim my-treopim-project | |
cd my-treopim-project/ | |
find . -type d -exec chmod 755 {} + && find . -type f -exec chmod 644 {} +; | |
cd | |
sudo cp -R my-treopim-project/ /var/www/ | |
sudo chown -R www-data:www-data /var/www/my-treopim-project | |
##Setup treopim.conf | |
sudo nano /etc/apache2/sites-available/treopim.conf | |
<VirtualHost *:80> | |
ServerAdmin admin@example.com | |
DocumentRoot /var/www/my-treopim-project | |
ServerName example.com | |
ServerAlias www.example.com | |
<Directory /var/www/my-treopim-project/> | |
Options +FollowSymlinks | |
AllowOverride All | |
Require all granted | |
</Directory> | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
</VirtualHost> | |
sudo a2dissite 000-default.conf | |
sudo a2ensite treopim.conf | |
sudo a2enmod rewrite | |
sudo service apache2 restart | |
#Visit | |
www.example.com | |
##Admin Login | |
Username : admin | |
Password : admin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment