Skip to content

Instantly share code, notes, and snippets.

View josdem's full-sized avatar
🤖
Moving to Google Cloud

Jose Morales josdem

🤖
Moving to Google Cloud
View GitHub Profile
@josdem
josdem / Git
Last active June 4, 2023 00:10
## Basic Commands
//Clone a project
git clone git@github.com:josdem/jmailer-spring-boot.git
//Get lastest changes from a project
git pull origin master
//Commit a change to a project
git commit -am "This is a comment about my changes to the project"
@josdem
josdem / Mysql
Last active April 23, 2024 14:49
//Set mysql root password
mysqladmin -u root password NEWPASSWORD
//Creates a new database
create database {databaseName}
//Show MySQL version from Workbench
SHOW VARIABLES LIKE "%version%";
//Create user
@josdem
josdem / Linux
Last active June 28, 2023 01:02
# Ubuntu
//How to see Linux version
lsb_release -a
cat /etc/centos-release
//Add user
adduser tomcat
//Add user with home directory
//Run a single integration test
gradle -Penvironment=test -Dtest.single=IntegraSTPConsumerServiceIntegrationSpec :service:test
//Run web module with jetty
gradle :web:jettyRun
//Run task setting environment
gradle -Penvironment=development :web:settingEnvironment
//Creating war and skip test
<!-- How create a minimal tomcat configuration with a AJP connection to apache -->
<?xml version='1.0' encoding='utf-8'?>
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<Service name="Catalina">
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
#!/bin/bash
#
# tomcat7 This shell script takes care of starting and stopping Tomcat
#
# chkconfig: - 80 20
#
### BEGIN INIT INFO
# Provides: tomcat7
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
<VirtualHost *:80>
DocumentRoot "/var/www/vhosts/qa"
ServerName qa.techminds.com.mx
<Directory "/var/www/vhosts/qa">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
ErrorLog logs/qa.techminds.com.mx-error_log
Create a rDNS in your ISP server provider
Create an MX record in your DNS service
Create an A record in your DNS service
Edit your /etc/hosts file, and add the ip_address and smtp.domain.com.
then type hostname smtp.aydew.com in your command line
Download zimbra from here: http://www.zimbra.com/downloads/os-downloads.html
Untar and run ./install.sh
Go to: servername:7071
1. Baja el Zip standalone de aquí. http://archiva.apache.org/
2. unzip y cambia el puerto a 8082 in ARCHIVA_HOME/conf/jetty.xml
3. Renombra apache-archiva-1.3.6 to archiva
4. Crea user archiva and setea owner to archiva directory (chown -R archiva.archiva .)
5. Setea JAVA_HOME al usuario archiva
6. Corre archiva: ARCHIVA_HOME/bin/archiva start & (como usuario archiva)
7. Abre http://server:8082/archiva
8. Setea admin información
1. Export 465 key from thunderbird (trama.crt)
2. Upload trama.crt to development@192.168.0.122
3. `keytool -keystore /opt/jdk1.7.0_25/jre/lib/security/cacerts -importcert -alias trama -file /home/tomcat/trama.crt`
4. Password is changeit
5. restart tomcat