Roundcude re install
Roundcude re install
Hi,
Anyone got a nice .sh script to reinstall roundcube to Vesta speck?
Or a remove and re install but to Vesta config they are willing to share
here is the standard one needs editing!
The download url will differ I am using Centos 6.7
wget -P /var/www/html http://downloads.sourceforge.net/projec ... 1.0.tar.gz
Mike
Anyone got a nice .sh script to reinstall roundcube to Vesta speck?
Or a remove and re install but to Vesta config they are willing to share
here is the standard one needs editing!
Code: Select all
#!/bin/sh
clear
if [ -z "${mysql_roundcube_password}" ]; then
tmp=$(</dev/urandom tr -dc A-Za-z0-9 | head -c12)
read -p "MySQL roundcube user password [${tmp}]:" mysql_roundcube_password
mysql_roundcube_password=${mysql_roundcube_password:-${tmp}}
echo "MySQL roundcube: ${mysql_roundcube_password}" >> .passwords
fi
if [ -z "${mysql_root_password}" ]; then
read -p "MySQL root password []:" mysql_root_password
fi
wget -P /var/www/html http://downloads.sourceforge.net/project/roundcubemail/roundcubemail/1.1.0/roundcubemail-1.1.0.tar.gz
tar -C /var/www/html -zxvf /var/www/html/roundcubemail-*.tar.gz
rm -f /var/www/html/roundcubemail-*.tar.gz
mv /var/www/html/roundcubemail-* /var/www/html/roundcube
mv /var/www/html/roundcube/composer.json-dist /var/www/html/roundcube/composer.json
(cd /var/www/html/roundcube && curl -sS https://getcomposer.org/installer | php && php composer.phar install --no-dev)
chown root:root -R /var/www/html/roundcube
chmod 777 -R /var/www/html/roundcube/temp/
chmod 777 -R /var/www/html/roundcube/logs/
cat <<'EOF' > /etc/httpd/conf.d/20-roundcube.conf
Alias /webmail /var/www/html/roundcube
<Directory /var/www/html/roundcube>
Options -Indexes
AllowOverride All
</Directory>
<Directory /var/www/html/roundcube/config>
Order Deny,Allow
Deny from All
</Directory>
<Directory /var/www/html/roundcube/temp>
Order Deny,Allow
Deny from All
</Directory>
<Directory /var/www/html/roundcube/logs>
Order Deny,Allow
Deny from All
</Directory>
EOF
sed -e "s|mypassword|${mysql_roundcube_password}|" <<'EOF' | mysql -u root -p"${mysql_root_password}"
USE mysql;
CREATE USER 'roundcube'@'localhost' IDENTIFIED BY 'mypassword';
GRANT USAGE ON * . * TO 'roundcube'@'localhost' IDENTIFIED BY 'mypassword';
CREATE DATABASE IF NOT EXISTS `roundcube`;
GRANT ALL PRIVILEGES ON `roundcube` . * TO 'roundcube'@'localhost';
FLUSH PRIVILEGES;
EOF
mysql -u root -p"${mysql_root_password}" 'roundcube' < /var/www/html/roundcube/SQL/mysql.initial.sql
cp /var/www/html/roundcube/config/config.inc.php.sample /var/www/html/roundcube/config/config.inc.php
sed -i "s|^\(\$config\['db_dsnw'\] =\).*$|\1 \'mysqli://roundcube:${mysql_roundcube_password}@localhost/roundcube\';|" /var/www/html/roundcube/config/config.inc.php
sed -i "s|^\(\$config\['smtp_server'\] =\).*$|\1 \'localhost\';|" /var/www/html/roundcube/config/config.inc.php
sed -i "s|^\(\$config\['smtp_user'\] =\).*$|\1 \'%u\';|" /var/www/html/roundcube/config/config.inc.php
sed -i "s|^\(\$config\['smtp_pass'\] =\).*$|\1 \'%p\';|" /var/www/html/roundcube/config/config.inc.php
#sed -i "s|^\(\$config\['support_url'\] =\).*$|\1 \'mailto:${E}\';|" /var/www/html/roundcube/config/config.inc.php
deskey=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9-_#&!*%?' | fold -w 24 | head -n 1)
sed -i "s|^\(\$config\['des_key'\] =\).*$|\1 \'${deskey}\';|" /var/www/html/roundcube/config/config.inc.php
rm -rf /var/www/html/roundcube/installer
service httpd reload
wget -P /var/www/html http://downloads.sourceforge.net/projec ... 1.0.tar.gz
Mike
Re: Roundcude re install
We have a config error we do not want to reinstall as the server is mint
apart from we have to restart apache once a day as the memory runs out if not.
The error is roundcube was put it after and is not standard as vesta wants.
Stopping httpd: [ OK ]
Starting httpd: [Sat Mar 05 10:31:03 2016] [warn] module ruid2_module is already loaded, skipping
Warning: DocumentRoot [/usr/share/roundcubemail] does not exist
Warning: DocumentRoot [/var/lib/roundcube] does not exist
Warning: DocumentRoot [/var/lib/roundcube] does not exist
Warning: DocumentRoot [/var/lib/roundcube] does not exist
[Sat Mar 05 10:31:04 2016] [error] (EAI 2)Name or service not known: Could not resolve host name 45.32.182.218:%ssl_port% -- ignoring!
Warning: DocumentRoot [/var/lib/roundcube] does not exist
[ OK ]
These errors from apache are because we change roundcube to the vesta folders /etc/roundcubemail/
So the apache conf is looking in the wrong place so I can change them in apache right!
But then it's not standard vesta!
So updates will not match
Mike
apart from we have to restart apache once a day as the memory runs out if not.
The error is roundcube was put it after and is not standard as vesta wants.
Stopping httpd: [ OK ]
Starting httpd: [Sat Mar 05 10:31:03 2016] [warn] module ruid2_module is already loaded, skipping
Warning: DocumentRoot [/usr/share/roundcubemail] does not exist
Warning: DocumentRoot [/var/lib/roundcube] does not exist
Warning: DocumentRoot [/var/lib/roundcube] does not exist
Warning: DocumentRoot [/var/lib/roundcube] does not exist
[Sat Mar 05 10:31:04 2016] [error] (EAI 2)Name or service not known: Could not resolve host name 45.32.182.218:%ssl_port% -- ignoring!
Warning: DocumentRoot [/var/lib/roundcube] does not exist
[ OK ]
These errors from apache are because we change roundcube to the vesta folders /etc/roundcubemail/
So the apache conf is looking in the wrong place so I can change them in apache right!
But then it's not standard vesta!
So updates will not match
Mike