- Details
- Written by: Stanko Milosev
- Category: Linux
- Hits: 2577
Example of generatin
- Details
- Written by: Stanko Milosev
- Category: Ubuntu
- Hits: 681
apt - Advanced Package Tool (APT) is a free-software user interface that works with core libraries to handle the installation and removal of software on Debian and Debian-based Linux distributions.
systemd status - determine the status of a service
nano - a simple terminal-based text editor
lsb_release - print distribution specific information
openssh-server - collection of tools for remotely controlling networked computers. Example:
sudo apt install openssh-server sudo systemctl enable --now ssh
pipeline ‘|’ or ‘|&’ - a sequence of one or more commands separated by one of the control operators.
grep - grep searches one or more input files for lines containing a match to a specified pattern. Example:
php -m | grep -i mysql
groupadd - create a new group
useradd - create a new user or update default new user information
ls - list directory contents. Example, check owner group and permissions of a file:
ls -l /myFolder/myJson.json
chown - change file owner and group. Example, change owner to myOwner, and group to myGroup:
sudo chown myOwner:myGroup /var/www/html/kanaloa/config.json
chmod - change access permissions. Example owner = 6 - read+write, group = 6 - read+write, all other = 4 - only read:
sudo chmod 664 /var/www/html/kanaloa/config.json
> - before a command is executed, its input and output may be redirected using a special notation interpreted by the shell.
find - find files. Example:
sudo find / -type f -name "dovecot-sql.conf" 2>/dev/null
-
find /— search starting from the root/, so essentially the whole filesystem. -
-type f— search only for files. -
-name "dovecot-sql.conf"— look for exactly this filename. -
2>/dev/null— redirection to hide permission-denied and other error messages.
wget - software package for retrieving files using HTTP, HTTPS, FTP and FTPS
tar - provides the ability to create and extract tar archives
mv - move (rename) files
composer - a dependency manager for PHP
rm - remove files or directories
ln - make links between files
journalctl - print log entries from the systemd journal
- Details
- Written by: Stanko Milosev
- Category: Ubuntu
- Hits: 15
sudo cp -a /var/www/roundcube /var/www/roundcube-backup-1.7.5
Also back up your Roundcube database:
mysqldump -u roundcube -p roundcube > roundcube.sqlDownload the new package, paying attention to the version:
cd /var/www sudo wget https://github.com/roundcube/roundcubemail/releases/download/1.7.6/roundcubemail-1.7.6-complete.tar.gz sudo tar --no-same-owner -xzf roundcubemail-1.7.6-complete.tar.gzInstall the update:
cd /var/www/roundcubemail-1.7.6 sudo php bin/installto.sh /var/www/roundcubeDelete old backups:
sudo rm -rf -- /var/www/roundcube-backup-1.7.3 /var/www/roundcubemail-1.7.5 sudo rm -f -- /var/www/roundcubemail-1.7.3-complete.tar.gz /var/www/roundcubemail-1.7.5-complete.tar.gz
- Details
- Written by: Stanko Milosev
- Category: Ubuntu
- Hits: 748
cd /var/www
sudo wget https://github.com/roundcube/roundcubemail/releases/download/1.7.2/roundcubemail-1.7.2-complete.tar.gz
sudo tar -xzf roundcubemail-1.7.2-complete.tar.gz
sudo mv roundcubemail-1.7.2 roundcube
cd roundcube
sudo chown -R www-data:www-data /var/www/roundcube
sudo find /var/www/roundcube -type d -exec chmod 755 {} \;
sudo find /var/www/roundcube -type f -exec chmod 644 {} \;
sudo chmod -R 775 /var/www/roundcube/temp
sudo chmod -R 775 /var/www/roundcube/logs
sudo mariadb
CREATE DATABASE roundcubemail CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER 'roundcube'@'localhost' IDENTIFIED BY 'YOUR_ROUNDCUBE_PASSWORD'; GRANT ALL PRIVILEGES ON roundcubemail.* TO 'roundcube'@'localhost'; FLUSH PRIVILEGES; EXIT;
sudo mariadb roundcubemail < /var/www/roundcube/SQL/mysql.initial.sql sudo cp config/config.inc.php.sample config/config.inc.php sudo nano config/config.inc.php
$config['enable_installer'] = true; $config['db_dsnw'] = 'mysql://roundcube:YOUR_ROUNDCUBE_PASSWORD@localhost/roundcubemail'; $config['imap_host'] = 'localhost:143'; $config['smtp_host'] = 'localhost:587'; $config['smtp_user'] = '%u'; $config['smtp_pass'] = '%p'; $config['support_url'] = ''; $config['product_name'] = 'Roundcube Webmail'; $config['des_key'] = 'GENERATE_A_RANDOM_24+_CHARACTER_SECRET_KEY'; $config['plugins'] = [ 'archive', 'zipdownload', ]; $config['skin'] = 'elastic'
openssl rand -base64 32 sudo nano /etc/nginx/sites-available/default
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
location / {
try_files $uri $uri/ =404;
}
location = /roundcube {
return 301 /roundcube/;
}
location /roundcube/ {
try_files $uri $uri/ /roundcube/index.php?$query_string;
}
location ~ ^/roundcube/(?(?:index|static|installer)\.php)(?/.*)?$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/roundcube/public_html/$rc_script;
fastcgi_param SCRIPT_NAME /roundcube/$rc_script;
fastcgi_param PATH_INFO $rc_path_info;
fastcgi_pass unix:/run/php/php8.5-fpm.sock;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.5-fpm.sock;
}
}
sudo nginx -t sudo systemctl reload nginx
Open:
http://mail.myDomain.com/roundcube/sudo rm -rf /var/www/roundcube/public_html/installerand delete
$config['enable_installer'] = true;