Tag Archives: ubuntu

ubuntu gcloud

apt install apt-transport-https ca-certificates gnupg -y
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -

apt update
apt install google-cloud-sdk

gcloud init
Welcome! This command will take you through the configuration of gcloud.

Your current configuration has been set to: [default]

You can skip diagnostics next time by using the following flag:
gcloud init --skip-diagnostics

Network diagnostic detects and fixes local network connection issues.
Checking network connection...done.
Reachability Check passed.
Network diagnostic passed (1/1 checks passed).

You must log in to continue. Would you like to log in (Y/n)?

pure-ftpd ubuntu


apt update
apt install -y pure-ftpd

rm -rf /etc/pure-ftpd/conf/* \
&& echo "clf:/var/log/pure-ftpd/transfer.log" > /etc/pure-ftpd/conf/AltLog \
&& echo "UTF-8" > /etc/pure-ftpd/conf/FSCharset \
&& echo "1000" > /etc/pure-ftpd/conf/MinUID \
&& echo "yes" > /etc/pure-ftpd/conf/NoAnonymous \
&& echo "no" > /etc/pure-ftpd/conf/PAMAuthentication \
&& echo "no" > /etc/pure-ftpd/conf/UnixAuthentication \
&& echo "/etc/pure-ftpd/pureftpd.pdb" > /etc/pure-ftpd/conf/PureDB \
&& touch /etc/pure-ftpd/pureftpd.pdb \
&& echo "027 007" > /etc/pure-ftpd/conf/Umask \
&& echo "yes" > /etc/pure-ftpd/conf/ChrootEveryone \
&& echo "yes" > /etc/pure-ftpd/conf/Daemonize \
&& echo "yes" > /etc/pure-ftpd/conf/DontResolve \
&& echo "no" > /etc/pure-ftpd/conf/BrokenClientsCompatibility \
&& echo "50" > /etc/pure-ftpd/conf/MaxClientsNumber \
&& echo "no" > /etc/pure-ftpd/conf/VerboseLog \
&& echo "yes" > /etc/pure-ftpd/conf/DisplayDotFiles \
&& echo "no" > /etc/pure-ftpd/conf/AnonymousOnly \
&& echo "ftp" > /etc/pure-ftpd/conf/SyslogFacility \
&& echo "no" > /etc/pure-ftpd/conf/AnonymousCanCreateDirs \
&& echo "30000 50000" > /etc/pure-ftpd/conf/PassivePortRange \
&& echo "no" > /etc/pure-ftpd/conf/AllowUserFXP \
&& echo "no" > /etc/pure-ftpd/conf/AllowAnonymousFXP \
&& echo "no" > /etc/pure-ftpd/conf/ProhibitDotFilesWrite \
&& echo "no" > /etc/pure-ftpd/conf/ProhibitDotFilesRead \
&& echo "no" > /etc/pure-ftpd/conf/AutoRename \
&& echo "yes" > /etc/pure-ftpd/conf/AnonymousCantUpload \
&& ln -sf /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/50pure \
&& ln -sf /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/40PureDB \
&& systemctl stop pure-ftpd \
&& systemctl start pure-ftpd \
&& systemctl status pure-ftpd

# To enable both plain-text and TLS encryption
echo "1" > /etc/pure-ftpd/conf/TLS

# Or disable plain-text and use TLS encryption only
echo "2" > /etc/pure-ftpd/conf/TLS

apt install -y certbot
certbot certonly --standalone --agree-tos --cert-name ftp.yourdomain.tld -n -m ftp@yourdomain.tld -d ftp.yourdomain.tld -d ftp2.yourdomain.tld --pre-hook "service apache2 stop" --post-hook "service apache2 start"

echo $(certbot certonly --standalone --agree-tos --cert-name ftp.yourdomain.tld -n -m ftp@yourdomain.tld -d ftp.yourdomain.tld -d ftp2.yourdomain.tld --pre-hook "service apache2 stop" --post-hook "service apache2 start") \
cd /etc/letsencrypt/live/ftp.yourdomain.tld/ \
&& cat cert.pem privkey.pem > pure-ftpd.pem \
&& rm /etc/ssl/private/pure-ftpd.pem \
&& mv pure-ftpd.pem /etc/ssl/private/ \
&& chmod 600 /etc/ssl/private/pure-ftpd.pem \
&& service pure-ftpd restart

#Add new user
groupadd ftpgroup
useradd -g ftpgroup -d /dev/null -s /etc ftpuser -d /home/ftpuser
chown -R ftpuser:ftpgroup /home/ftpuser

pure-pw useradd ftpaccountname -u ftpuser -g ftpgroup -d /home/ftpuser
pure-pw mkdb
pure-pw show ftpaccountname

#Reset FTP User Password
pure-pw list
pure-pw passwd ftpaccountname
pure-pw mkdb

#Delete FTP User
pure-pw userdel ftpaccountname
pure-pw mkdb

apt-fast

apt-get install aria2
wget https://github.com/ilikenwf/apt-fast/archive/master.zip
nzip master.zip
cd apt-fast-master
cp apt-fast /usr/bin
cp apt-fast.conf /etc
cp ./man/apt-fast.8 /usr/share/man/man8
gzip /usr/share/man/man8/apt-fast.8
cp ./man/apt-fast.conf.5 /usr/share/man/man5
gzip /usr/share/man/man5/apt-fast.conf.5

Ubuntu 14.04 no Wireless (UNCLAIMED)

If after no finished update no wifi in your network mannager, you need:

sudo lshw -C network

*-network UNCLAIMED
description: Network controller
product: RT3290 Wireless 802.11n 1T/1R PCIe
vendor: Ralink corp.
physical id: 0
bus info: pci@0000:02:00.0
version: 00
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: latency=0
resources: memory:f7d10000-f7d1ffff

Fix.

sudo modprobe rt2800pci
sudo echo “modprobe rt2800pci” >> /etc/modules

*-network
description: Wireless interface
product: RT3290 Wireless 802.11n 1T/1R PCIe
vendor: Ralink corp.
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlan0
version: 00
serial: bc:85:56:11:43:e1
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=rt2800pci driverversion=3.13.0-49-generic firmware=0.37 ip=10.42.0.177 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
resources: irq:17 memory:f7d10000-f7d1ffff

sudo apt-get update
sudo apt-get upgrade