Closed M1k13 closed 5 years ago
Oke I found out what I did wrong, if you like a I can submit the install script for you.
Fine, it would be helpful for others, as I could pulish the script in he documentation.
Thanks!
Im still kinda new with scripts but it works great as an instalation guide and pls change/swap stuff around if you think its beter. First one is for httpd and second one is for nginx.
HTTPD:
cd ~ yum -y install bash-completion.noarch epel-release.noarch centos-release-scl centos-release-scl-rh scl-utils
yum -y install httpd mariadb-server mariadb rh-php70 rh-php70-php sclo-php70-php-mcrypt rh-php70-php-ldap rh-php70-php-xml rh-php70-php-json rh-php70-php-gd rh-php70-php-pdo rh-php70-php-mbstring rh-php70-php-cli rh-php70-php-mysqlnd composer.noarch mod_ssl wget
systemctl enable httpd.service systemctl start httpd.service
systemctl enable mariadb.service systemctl start mariadb.service
/usr/bin/mysql_secure_installation <<EOF
y password password n n n n EOF
ln -s /opt/rh/httpd24/root/etc/httpd/conf.d/rh-php70-php.conf /etc/httpd/conf.d/ ln -s /opt/rh/httpd24/root/etc/httpd/conf.modules.d/15-rh-php70-php.conf /etc/httpd/conf.modules.d/ ln -s /opt/rh/httpd24/root/etc/httpd/modules/librh-php70-php7.so /etc/httpd/modules/
wget https://github.com/nuxsmin/sysPass/archive/3.0.0.18100801-beta.tar.gz
cp .tar.gz /var/www/html/ cd /var/www/html/ tar -xzf .tar.gz
rm -f 3.0.0.18100801-beta.tar.gz mv */ syspass
cd /var/www/html/syspass scl enable rh-php70 bash
composer install
cd /var/www/html/syspass cp -rf * /var/www/html chmod -R 750 /var/www/html/ chown -R apache /var/www/html/
systemctl restart httpd
cd /var/www/html/syspass
sed '/DirectoryIndex index.html/s/$/ index.php/' /etc/httpd/conf/httpd.conf
systemctl restart httpd
shutdown -r now
NGINX: cd ~ yum -y install bash-completion.noarch epel-release.noarch centos-release-scl centos-release-scl-rh scl-utils
yum -y install nginx mariadb-server mariadb rh-php70 rh-php70-php rh-php70-php-fpm sclo-php70-php-mcrypt rh-php70-php-ldap rh-php70-php-xml rh-php70-php-json rh-php70-php-gd rh-php70-php-pdo rh-php70-php-mbstring rh-php70-php-cli rh-php70-php-mysqlnd composer.noarch mod_ssl wget
service nginx start service nginx enable
comment the next lines in /etc/nginx/nginx.conf
systemctl restart nginx systemctl enable nginx
vim /etc/nginx/conf.d/syspass.conf server { listen 80; server_name syspass20.promea.tds.hq.org;
location / { root /var/www/syspass; index index.html index.php; try_files $uri $uri/ =404; }
error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } location ~ .php$ { root /var/www/syspass; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_NAME \$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
systemctl restart nginx
vim /etc/opt/rh/rh-php70/php-fpm.d/www.conf sudo sed -i 's/user = apache/user = nginx/g' /etc/opt/rh/rh-php70/php-fpm.d/www.conf sudo sed -i 's/group = apache/group = nginx/g' /etc/opt/rh/rh-php70/php-fpm.d/www.conf
usermod -aG nginx apache
systemctl enable rh-php70-php-fpm
systemctl enable mariadb.service systemctl start mariadb.service
/usr/bin/mysql_secure_installation <<EOF
y password password y y y y EOF
wget https://github.com/nuxsmin/sysPass/archive/3.0.0.18100801-beta.tar.gz
cd /var/www tar -xzf 3.0.0.18100801-beta.tar.gz mv sysPass-3.0.0.18100801-beta/ syspass rm -rf 3.0.0.18100801-beta.tar.gz
chmod -R 750 /var/www/syspass/ chown -R nginx /var/www/syspass/
systemctl restart nginx scl enable rh-php70 bash systemctl enable rh-php70-php-fpm.service service rh-php70-php-fpm start
cd /var/www/syspass composer install
shutdown -r now
On 31 Oct 2018, at 07:53, RubénD notifications@github.com wrote:
Fine, it would be helpful for others, as I could pulish the script in he documentation.
Thanks!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nuxsmin/sysPass/issues/1087#issuecomment-434580594, or mute the thread https://github.com/notifications/unsubscribe-auth/Ap-3So9as3sYJryzqC2MWAS2kwUSARATks5uqUkFgaJpZM4X7tsc.
I'll keep this opened as documentation reminder
Hey Ruben,
Your syspass works great when i fallow your installation instructions but im trying not to use the repositories from ius. Using Centos7 This is what i did:
!bin/bash
cd ~ yum -y install bash-completion.noarch epel-release.noarch centos-release-scl centos-release-scl-rh scl-utils
yum -y install httpd mariadb-server mariadb rh-php70 sclo-php70-php-mcrypt rh-php70-php-ldap rh-php70-php-xml rh-php70-php-json rh-php70-php-gd rh-php70-php-pdo rh-php70-php-mbstring rh-php70-php-fpm.x86_64 rh-php70-php-cli rh-php70-php-mysqlnd mod_ssl wget
systemctl enable httpd.service systemctl start httpd.service
systemctl enable mariadb.service systemctl start mariadb.service
/usr/bin/mysql_secure_installation
wget https://github.com/nuxsmin/sysPass/archive/3.0.0.18040302-beta.tar.gz
wget https://github.com/nuxsmin/sysPass/archive/3.0.0.18100801-beta.tar.gz
cp .tar.gz /var/www/html/ cd /var/www/html/ tar -xzf .tar.gz
mv */ syspass
chmod -R 750 /var/www/html/syspass/ chown -R apache:apache /var/www/html/syspass/
echo "ProxyPassMatch ^/(..php(/.)?)$ fcgi://127.0.0.1:9000/var/www/html/\$1" >> /etc/httpd/conf/httpd.conf echo "DirectoryIndex /index.php index.php" >> /etc/httpd/conf/httpd.conf
systemctl restart httpd
yum -y install composer.noarch
cd /var/www/html/syspass
scl enable rh-php70 bash
systemctl enable rh-php70-php-fpm.service
service rh-php70-php-fpm start
composer install
shutdown -r now
At the end it gives me 2 errors when i try to install it and when i run the error log it says:
[Thu Oct 25 12:50:54.925554 2018] [proxy_fcgi:error] [pid 3178] [client 10.5.112.71:50169] AH01071: Got error 'Primary script unknown\n', referer: http://*********/syspass/index.php?r=install/index
any advice?